.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "GDALBUILDVRT" "1" "Feb 08, 2024" "" "GDAL"
.SH NAME
gdalbuildvrt \- Builds a VRT from a list of datasets.
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gdalbuildvrt [\-\-help] [\-\-help\-general]
             [\-tileindex <field_name>]
             [\-resolution {highest|lowest|average|user}]
             [\-te <xmin> <ymin> <xmax> <ymax>] [\-tr <xres> <yres>] [\-tap]
             [\-separate] [\-b <band>]... [\-sd <subdataset>]
             [\-allow_projection_difference] [\-q]
             [\-addalpha] [\-hidenodata]
             [\-srcnodata \(dq<value>[ <value>]...\(dq] [\-vrtnodata \(dq<value>[ <value>]...\(dq
             [\-ignore_srcmaskband]
             [\-a_srs <srs_def>]
             [\-r {nearest|bilinear|cubic|cubicspline|lanczos|average|mode}]
             [\-oo <NAME>=<VALUE>]...
             [\-input_file_list <filename>] [\-overwrite]
             [\-strict | \-non_strict]
             <output_filename.vrt> <input_raster> [<input_raster>]...
.ft P
.fi
.UNINDENT
.UNINDENT
.SH DESCRIPTION
.sp
This program builds a VRT (Virtual Dataset) that is a mosaic of the list of
input GDAL datasets. The list of input GDAL datasets can be specified at the end
of the command line, or put in a text file (one filename per line) for very long lists,
or it can be a MapServer tileindex (see \fI\%gdaltindex\fP utility). In the later case, all
entries in the tile index will be added to the VRT.
.sp
With \-separate, each files goes into a separate band in the VRT dataset. Otherwise,
the files are considered as tiles of a larger mosaic and the VRT file has as many bands as one
of the input files.
.sp
If one GDAL dataset is made of several subdatasets and has 0 raster bands,
all the subdatasets will be added to the VRT rather than the dataset itself.
.sp
gdalbuildvrt does some amount of checks to assure that all files that will be put
in the resulting VRT have similar characteristics : number of bands, projection, color
interpretation... If not, files that do not match the common characteristics will be skipped.
(This is only true in the default mode, and not when using the \-separate option)
.sp
If there is some amount of spatial overlapping between files, the order of files
appearing in the list of source matter: files that are listed at the end are the ones
from which the content will be fetched. Note that nodata will be taken into account
to potentially fetch data from less priority datasets, but currently, alpha channel
is not taken into account to do alpha compositing (so a source with alpha=0
appearing on top of another source will override is content). This might be
changed in later versions.
.INDENT 0.0
.TP
.B \-\-help
Show this help message and exit
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help\-general
Gives a brief usage message for the generic GDAL commandline options and exit.
.UNINDENT
.INDENT 0.0
.TP
.B \-tileindex
Use the specified value as the tile index field, instead of the default
value which is \(aqlocation\(aq.
.UNINDENT
.INDENT 0.0
.TP
.B \-resolution {highest|lowest|average|user}
In case the resolution of all input files is not the same, the \-resolution flag
enables the user to control the way the output resolution is computed.
.sp
\fIhighest\fP will pick the smallest values of pixel dimensions within the set of source rasters.
.sp
\fIlowest\fP will pick the largest values of pixel dimensions within the set of source rasters.
.sp
\fIaverage\fP is the default and will compute an average of pixel dimensions within the set of source rasters.
.sp
\fIuser\fP must be used in combination with the \fI\%\-tr\fP option to specify the target resolution.
.UNINDENT
.INDENT 0.0
.TP
.B \-tr <xres> <yres>
Set target resolution. The values must be expressed in georeferenced units.
Both must be positive values. Specifying those values is of course incompatible with
highest|lowest|average values for \fI\%\-resolution\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-tap
(target aligned pixels) align
the coordinates of the extent of the output file to the values of the \fI\%\-tr\fP,
such that the aligned extent includes the minimum extent.
Alignment means that xmin / resx, ymin / resy, xmax / resx and ymax / resy are integer values.
.UNINDENT
.INDENT 0.0
.TP
.B \-te <xmin> <ymin> <xmax> <ymax>
Set georeferenced extents of VRT file. The values must be expressed in georeferenced units.
If not specified, the extent of the VRT is the minimum bounding box of the set of source rasters.
.UNINDENT
.INDENT 0.0
.TP
.B \-addalpha
Adds an alpha mask band to the VRT when the source raster have none. Mainly useful for RGB sources (or grey\-level sources).
The alpha band is filled on\-the\-fly with the value 0 in areas without any source raster, and with value
255 in areas with source raster. The effect is that a RGBA viewer will render
the areas without source rasters as transparent and areas with source rasters as opaque.
This option is not compatible with \fI\%\-separate\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-hidenodata
Even if any band contains nodata value, giving this option makes the VRT band
not report the NoData. Useful when you want to control the background color of
the dataset. By using along with the \-addalpha option, you can prepare a
dataset which doesn\(aqt report nodata value but is transparent in areas with no
data.
.UNINDENT
.INDENT 0.0
.TP
.B \-srcnodata \(dq<value>[ <value>]...\(dq
Set nodata values for input bands (different values can be supplied for each band). If
more than one value is supplied all values should be quoted to keep them
together as a single operating system argument. If the option is not specified, the
intrinsic nodata settings on the source datasets will be used (if they exist). The value set by this option
is written in the NODATA element of each ComplexSource element. Use a value of
\fINone\fP to ignore intrinsic nodata settings on the source datasets.
.UNINDENT
.INDENT 0.0
.TP
.B \-ignore_srcmaskband
New in version 3.3.

.sp
Starting with GDAL 3.3, if a source has a mask band (internal/external mask
band, or alpha band), a <ComplexSource> element is created by default with
a <UseMaskBand>true</UseMaskBand> child element, to instruct the VRT driver
to use the mask band of the source to mask pixels being composited. This is
a generalization of the NODATA element.
When specifying the \-ignore_srcmaskband option, the mask band of sources will
not be taken into account, and in case of overlapping between sources, the
last one will override previous ones in areas of overlap.
.UNINDENT
.INDENT 0.0
.TP
.B \-b <band>
Select an input <band> to be processed. Bands are numbered from 1.
If input bands not set all bands will be added to vrt.
Multiple \fI\%\-b\fP switches may be used to select a set of input bands.
.UNINDENT
.INDENT 0.0
.TP
.B \-sd< <subdataset>
If the input
dataset contains several subdatasets use a subdataset with the specified
number (starting from 1). This is an alternative of giving the full subdataset
name as an input.
.UNINDENT
.INDENT 0.0
.TP
.B \-vrtnodata \(dq<value>[ <value>]...\(dq
Set nodata values at the VRT band level (different values can be supplied for each band).  If more
than one value is supplied all values should be quoted to keep them together
as a single operating system argument.  If the option is not specified,
intrinsic nodata settings on the first dataset will be used (if they exist). The value set by this option
is written in the NoDataValue element of each VRTRasterBand element. Use a value of
\fINone\fP to ignore intrinsic nodata settings on the source datasets.
.UNINDENT
.INDENT 0.0
.TP
.B \-separate
Place each input file into a separate band. Contrary to the default mode, it is not
required that all bands have the same datatype.
.sp
Starting with GDAL 3.8, all bands of each input file are added as separate
VRT bands, unless \fI\%\-b\fP is specified to select a subset of them.
Before GDAL 3.8, only the first band of each input file was placed into a
new VRT band, and \fI\%\-b\fP was ignored.
.UNINDENT
.INDENT 0.0
.TP
.B \-allow_projection_difference
When this option is specified, the utility will accept to make a VRT even if the input datasets have
not the same projection. Note: this does not mean that they will be reprojected. Their projection will
just be ignored.
.UNINDENT
.INDENT 0.0
.TP
.B \-a_srs <srs_def>
Override the projection for the output file.  The <srs_def> may be any of the usual GDAL/OGR forms,
complete WKT, PROJ.4, EPSG:n or a file containing the WKT. No reprojection is done.
.UNINDENT
.INDENT 0.0
.TP
.B \-r {nearest|bilinear|cubic|cubicspline|lanczos|average|mode}
Select a resampling algorithm. Nearest is the default
.UNINDENT
.INDENT 0.0
.TP
.B \-oo <NAME>=<VALUE>
Dataset open option (format specific)
.sp
New in version 2.2.

.UNINDENT
.INDENT 0.0
.TP
.B \-input_file_list <filename>
To specify a text file with an input filename on each line
.UNINDENT
.INDENT 0.0
.TP
.B \-q
To disable the progress bar on the console
.UNINDENT
.INDENT 0.0
.TP
.B \-overwrite
Overwrite the VRT if it already exists.
.UNINDENT
.INDENT 0.0
.TP
.B \-strict
Turn warnings as failures. This is mutually exclusive with \-non_strict, the latter which is the default.
.sp
New in version 3.4.2.

.UNINDENT
.INDENT 0.0
.TP
.B \-non_strict
Skip source datasets that have issues with warnings, and continue processing. This is the default.
.sp
New in version 3.4.2.

.UNINDENT
.SH EXAMPLES
.INDENT 0.0
.IP \(bu 2
Make a virtual mosaic from all TIFF files contained in a directory :
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gdalbuildvrt doq_index.vrt doq/*.tif
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP \(bu 2
Make a virtual mosaic from files whose name is specified in a text file :
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gdalbuildvrt \-input_file_list my_list.txt doq_index.vrt
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP \(bu 2
Make a RGB virtual mosaic from 3 single\-band input files :
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gdalbuildvrt \-separate rgb.vrt red.tif green.tif blue.tif
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP \(bu 2
Make a virtual mosaic with blue background colour (RGB: 0 0 255) :
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gdalbuildvrt \-hidenodata \-vrtnodata \(dq0 0 255\(dq doq_index.vrt doq/*.tif
.ft P
.fi
.UNINDENT
.UNINDENT
.SH C API
.sp
This utility is also callable from C with \fI\%GDALBuildVRT()\fP\&.
.SH AUTHOR
Even Rouault <even.rouault@spatialys.com>
.SH COPYRIGHT
1998-2024
.\" Generated by docutils manpage writer.
.
